

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script type="text/javascript" src="helpman_topicinit.js"></script>

<title>Create Diagram Profiles [Enterprise Architect User Guide]</title>

<meta name="keywords" content="Enterprise Architect, Sparx Systems, UML, Diagram,Diagram Profiles,Diagram Types, Custom,Custom,Custom Diagram Types,MDG Technologies,MDG Technologies Include Custom Diagram Types">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link type="text/css" href="default.css" rel="stylesheet" />
<style type="text/css">
  A, A:Visited
  {
    color: #00F;
  }

  A:Active, A:Hover
  {
    color: #F00;
  }

  OL
  {
    margin: 5px 0 5px 48px;
  }

  UL
  {
    margin-bottom: 3px;
    margin-top: 0;
  }

  #nsr
  {
    background-color: #D4DFFF;
  }

  #nsr A
  {
    text-decoration: none;
  }

  #mainbody
  {
    padding: 8px;
  }

  .p_BodyText
  {
    padding: 5px 0;
  }
</style>



<style type="text/css" media="screen">
  BODY
  {
    background-color: #FFFFFF;
  }

  #nsr
  {
    padding: 6px 6px 0 6px;
    border-bottom: none;
    vertical-align: top;
    z-index: 2;
    visibility: visible;
    left: 0;
    top: 0;
    position: absolute;
  }

  #mainbody
  {
    left: 0;
    top: 0;
    margin: 0;
    position: absolute;
    padding: 10px;
    overflow: auto;
    height: 100%;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
  }
</style>

<style type="text/css" media="print">
  #nsr
  {
    visibility: none;
  }

  #mainbody
  {
    overflow: visible;
  }
</style>
<script type="text/javascript" language="JavaScript" src="nonscroll.js"></script>

</head>
<body scroll="no">

<div id="page">



        <div id="content">
          <div id="content-inner">
          



  
          <div id="nsr">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr valign="top">
                <td align="left">
  


                  <p class="p_Heading1"><span class="f_Heading1">Create Diagram Profiles</span></p>



  
                </td>
                <td align="right">
                  <a href="introduction.htm" onmouseover="document.images.main.src='button_main_h.gif'" onmouseout="document.images.main.src='button_main.gif'">
                    <img name="main" src="button_main.gif" border=0 alt="Return to Introduction">
                  </a>&nbsp;
    
                  <a href="connectors_used_in_toolboxes.htm" onmouseover="document.images.prev.src='button_prev_h.gif'" onmouseout="document.images.prev.src='button_prev.gif'">
                    <img name=prev src="button_prev.gif" border=0 alt="Previous page" />
                  </a>&nbsp;
    
    
    
                  <a href="built_in_diagram_types.htm" onmouseover="document.images.next.src='button_next_h.gif'" onmouseout="document.images.next.src='button_next.gif'">
                    <img name=next src="button_next.gif" border=0 alt="Next page" />
                  </a>
    
    
                </td>
              </tr>
            </table>
          </div>
          <div id="mainbody">
  


                <p class="p_SubHeadingL1"><span class="f_SubHeadingL1">Custom Diagram Types</span></p>
<p class="p_BodyText"><span class="f_BodyText">You can create extended diagram types in Enterprise Architect and include them in MDG Technologies. To do this, perform the following steps.</span></p>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=1><span class="f_NumberedList">Create a profile with the same name as the MDG Technology in which it is to be included; e.g. </span><span class="f_NumberedList" style="font-style: italic;">SysML</span><span class="f_NumberedList">.</span></li>
<li value=2><span class="f_NumberedList">Create a &laquo;s</span><span class="f_NumberedList" style="font-style: italic;">tereotype</span><span class="f_NumberedList">&raquo; Class element that is named as the custom diagram, e.g. </span><span class="f_NumberedList" style="font-style: italic;">BlockDefinition</span><span class="f_NumberedList">.</span></li>
<li value=3><span class="f_NumberedList">Create a Class element and name it as one of the <a href="built_in_diagram_types.htm">Built-In Diagram Types</a> prefixed with </span><span class="f_NumberedList" style="font-style: italic;">Diagram_</span><span class="f_NumberedList">, for example </span><span class="f_NumberedList" style="font-style: italic;">Diagram_Logical</span><span class="f_NumberedList"> for Class diagrams or </span><span class="f_NumberedList" style="font-style: italic;">Diagram_Use Case</span><span class="f_NumberedList"> for Use Case diagrams.</span></li>
</ol>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=4><span class="f_NumberedList">Give the </span><span class="f_NumberedList" style="font-style: italic;">Diagram_x</span><span class="f_NumberedList"> Class the &laquo;</span><span class="f_NumberedList" style="font-style: italic;">metaclass</span><span class="f_NumberedList">&raquo; stereotype and draw an &laquo;</span><span class="f_NumberedList" style="font-style: italic;">extends</span><span class="f_NumberedList">&raquo; connector from the stereotype to the metaclass.</span></li>
<li value=5><span class="f_NumberedList">In the </span><span class="f_MenuKeyField">Notes</span><span class="f_NumberedList"> field, give the stereotype Class a brief description of what the diagram is used for. This description displays in the bottom right-hand corner of the </span><span class="f_UIControl">New Diagram</span><span class="f_NumberedList"> dialog.</span></li>
<li value=6><span class="f_NumberedList">Give the </span><span class="f_NumberedList" style="font-style: italic;">Diagram_x</span><span class="f_NumberedList"> Class the following attributes as required:</span></li>
</ol>
<ul style="text-indent: 0px; margin-left: 65px; list-style-position: outside;">
<li><span class="f_Bulletlist3" style="font-style: italic;">alias: string = Type </span><span class="f_Bulletlist3">(where </span><span class="f_Bulletlist3" style="font-style: italic;">Type</span><span class="f_Bulletlist3"> appears before the word 'Diagram' on the diagram title bar)</span></li>
<li><span class="f_Bulletlist3" style="font-style: italic;">diagramID: string = abc</span><span class="f_Bulletlist3"> (where </span><span class="f_Bulletlist3" style="font-style: italic;">abc</span><span class="f_Bulletlist3"> is the diagram type that appears in the <a href="diagram_frame.htm">diagram frame</a> label)</span></li>
<li><span class="f_Bulletlist3" style="font-style: italic;">toolbox: string = ToolboxName</span><span class="f_Bulletlist3"> (where </span><span class="f_Bulletlist3" style="font-style: italic;">ToolboxName</span><span class="f_Bulletlist3"> is the name of the toolbox profile for the toolbox that opens automatically each time a diagram is opened)</span></li>
<li><span class="f_Bulletlist3" style="font-style: italic;">frameString: string = FrameFormatString</span><span class="f_Bulletlist3"> (where </span><span class="f_Bulletlist3" style="font-style: italic;">FrameFormatString</span><span class="f_Bulletlist3"> is a string containing substitution macros for defining the frame title, with or without additional delimiters such as</span><span class="f_Bulletlist3" style="font-weight: bold;"> [ ]</span><span class="f_Bulletlist3">; m</span><span class="f_Bulletlist3">acros that can be used are:</span></li>
</ul>
<ul style="text-indent: 0px; margin-left: 85px; list-style-position: outside;">
<li><span class="f_Bulletlist3">#DGMSTEREO#</span></li>
<li><span class="f_Bulletlist3">#DGMID#</span></li>
<li><span class="f_Bulletlist3">#DGMTYPE#</span></li>
<li><span class="f_Bulletlist3">#DGMALIAS#</span></li>
<li><span class="f_Bulletlist3">#DGMOWNERNAME#</span></li>
<li><span class="f_Bulletlist3">#DGMOWNERNAMEFULL#</span></li>
<li><span class="f_Bulletlist3">#DGMNAME#</span></li>
<li><span class="f_Bulletlist3">#DGMNAMEFULL#</span></li>
</ul>
<ul style="text-indent: 0px; margin-left: 65px; list-style-position: outside;">
<li><span class="f_Bulletlist3" style="font-style: italic;">swimlanes: string = Lanes=2;Orientation=Horizontal;Lane1=Title1;Lane2=Title2; </span><span class="f_Bulletlist3">(where </span><span class="f_Bulletlist3" style="font-style: italic;">Lanes</span><span class="f_Bulletlist3"> can be any value, but the number of </span><span class="f_Bulletlist3" style="font-style: italic;">Lane&lt;n&gt;</span><span class="f_Bulletlist3"> values</span><span class="f_Bulletlist3"> must equal the value of </span><span class="f_Bulletlist3" style="font-style: italic;">Lanes</span><span class="f_Bulletlist3">; </span><span class="f_Bulletlist3" style="font-style: italic;">Orientation</span><span class="f_Bulletlist3"> can be omitted, in which case the swimlanes default to vertical)</span></li>
<li><span class="f_Bulletlist3" style="font-style: italic;">styleex: string = </span><span class="f_Bulletlist3">one or more of a range of values; see <a href="attribute_values___stylex__pda.htm">Attribute Values - stylex &amp; pdata</a></span></li>
<li><span class="f_Bulletlist3" style="font-style: italic;">pdata: string = </span><span class="f_Bulletlist3">one or more of a range of values; see <a href="attribute_values___stylex__pda.htm">Attribute Values - stylex &amp; pdata</a>.</span></li>
</ul>
<p class="p_Bulletlist3"><span class="f_Bulletlist3">The following example shows the DFD diagram profile which defines a DFD diagram as an extension of the Enterprise Architect Analysis diagram.</span><br>
<span class="f_Bulletlist3">&nbsp;</span></p>
<p class="p_Bulletlist3"><img src="dfd.png" width="481" height="186" border="0" alt="dfd"><br>
<span class="f_Bulletlist3">&nbsp;</span></p>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=7><span class="f_NumberedList">Save the diagram as a profile in the usual manner.</span></li>
</ol>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=8><span class="f_NumberedList">If you are using the MDG Technology Wizard with an MTS file to generate your technology, edit the MTS file to get the DiagramProfile generated into your technology file. Inside the root &lt;</span><span class="f_NumberedList" style="font-style: italic;">MDG.Selections</span><span class="f_NumberedList">&gt; node insert the following.</span></li>
</ol>
<p class="p_Code" style="margin: 0px 0px 0px 48px;"><span class="f_Code">&nbsp;</span></p>
<p class="p_Code" style="margin: 0px 0px 0px 48px;"><span class="f_Code">&lt;DiagramProfile directory=&quot;MyPath&quot; files=&quot;MyFile1.xml,MyFile2.xml&quot;/&gt;</span></p>
<p class="p_Code" style="margin: 0px 0px 0px 48px;"><span class="f_Code">&nbsp;</span></p>
<p class="p_NumberedList"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_NumberedList">Where </span><span class="f_NumberedList" style="font-style: italic;">MyPath</span><span class="f_NumberedList"> is the directory your </span><span class="f_NumberedList" style="font-style: italic;">DiagramProfile</span><span class="f_NumberedList"> is saved in, and </span><span class="f_NumberedList" style="font-style: italic;">MyFile1.xml</span><span class="f_NumberedList"> and </span><span class="f_NumberedList" style="font-style: italic;">MyFile2.xml</span><span class="f_NumberedList"> are the diagram profiles to include in this technology. </span></p>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=9><span class="f_NumberedList">Save the MTS file.</span></li>
</ol>




            </div>
          </div>
        </div>



</div>


</body>
</html>
